package com.pearl.jacksoncore.demo.feature;

import com.fasterxml.jackson.annotation.JsonEnumDefaultValue;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * @author TD
 * @version 1.0
 * @date 2024/3/21
 */
public enum GenderEnum {

    MAN("man", "男"),

    WOMAN("woman", "女"),
    @JsonEnumDefaultValue
    UNKNOWN("unknown", "默认值")
    ;

    GenderEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    private String code;

    private String desc;

    @Override
    public String toString() {
        return desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}